package test00.lx03;

import java.util.Arrays;
import java.util.Comparator;

/**
 * @author CSY
 * @date 2025 - 04 - 02
 */
public class MainTest02 {
    public static void main(String[] args) {
        Integer[] arr = {1,5,6,2,7,3,4,8,10,50,32,40};
        // int compare(Integer o1, Integer o2)
        //o2-o1就是降序，o1-o2为升序
        Arrays.sort(arr, (o1,o2)->o2-o1);

        System.out.println(Arrays.toString(arr));
    }
}
